public class NatStrTest {
    public static void main(String[] args) {
        String str1 = "a";
        String str2 = "a";
        System.out.println(str1 == str2); // true

        String x = 1;
        String str3 = "a" + x;
        System.out.println(str1 == str3);

        // String_Pool's value
        str3 = str3.intern();
        System.out.println(str3);
        System.out.println(str1 == str3);

        String str4 = str3.intern();
        System.out.println(str3 == str4);
    }
}
